<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" errorPage="/error.jsp" isELIgnored="false" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.opensymphony.com/oscache" prefix="cache" %>
<%@ taglib uri="http://atleap.blandware.com/taglib" prefix="atleap" %>
<html:xhtml />

<atleap:constants className="com.blandware.atleap.model.core.Sequence" scope="page" var="TYPE_PAGES" />
<atleap:constants className="com.blandware.atleap.model.core.Sequence" scope="page" var="TYPE_RESOURCES" />
<atleap:constants className="com.blandware.atleap.webapp.util.core.WebappConstants" var="OWNER_INFO_KEY" scope="page" />
<atleap:constants className="com.blandware.atleap.webapp.util.core.WebappConstants" var="SEQUENCE_KEY" scope="page" />
<atleap:constants className="com.blandware.atleap.webapp.util.core.WebappConstants" var="BROWSER_MODE_PAGE_LINKS" scope="page" />
<atleap:constants className="com.blandware.atleap.webapp.util.core.WebappConstants" var="BROWSER_MODE_RESOURCE_LINKS" scope="page" />

<c:set var="sequence" value="${sessionScope[pageScope.SEQUENCE_KEY]}" />

<atleap:javascript formName="sequenceItemForm" staticJavascript="false" dynamicJavascript="true" method="validateForm" cdata="false" />
<atleap:content identifier="information" ignore="true" uri="/core/sequenceItem/callCreate" />
<atleap:messages />
<atleap:form action="core/sequenceItem/update" method="POST">
	<table cellpadding="0" cellspacing="0" border="0" class="modificationTable">
		<tr>
			<th><atleap:message key="core.sequenceItem.form.sequenceOwnerInfo" /></th>
			<td>${sessionScope[pageScope.OWNER_INFO_KEY]}</td>
        </tr>
        <tr>
            <th><atleap:message key="core.sequenceItem.form.sequenceIdentifier" /></th>
            <td><c:out value="${sequence.identifier}" escapeXml="true" /></td>
        </tr>
        <tr>
            <th><atleap:message key="core.sequenceItem.form.sequenceType" /></th>
            <td><atleap:message key="core.sequence.form.type.${sequence.type}" /></td>
        </tr>
    </table>
    <table cellpadding="0" cellspacing="0" border="0" class="modificationTable">
        <tr>
            <th>
                <atleap:message key="core.sequenceItem.form.object" />
            </th>
            <td nowrap="nowrap">
				<html:text property="objectIdentifier" styleClass="text" styleId="objectIdentifierInput" />
				<a href="javascript:void(0);" title="<atleap:message key="core.commons.buttons.browseLinks" />" onclick="browseInPopup('<atleap:rewriteUrl action="${sequence.type == TYPE_PAGES ? '/core/browser/browseContentPages' : '/core/browser/browseImages'}" addLocaleSuffix="false"><atleap:param name="opening" value="true" /><atleap:param name="mode" value="${sequence.type == TYPE_PAGES ? BROWSER_MODE_PAGE_LINKS : BROWSER_MODE_RESOURCE_LINKS}" /></atleap:rewriteUrl>', 'objectIdentifierInput', 800, 500); return false;">
					<img src="<atleap:rewriteUrl href="/images/theme/${appConfig['adminCssTheme']}/hyperlink.gif" />" title="<atleap:message key="core.commons.buttons.browseLinks" />" alt="<atleap:message key="core.commons.buttons.browseLinks" />"  /></a>
            </td>
        </tr>
    </table>
    <html:hidden property="id"/>
    <html:hidden property="sequenceId"/>
    <html:hidden property="version" />
    <atleap:submit styleClass="button"><atleap:message key="core.commons.buttons.update" /></atleap:submit>
    <atleap:cancel styleClass="button"><atleap:message key="core.commons.buttons.cancel" /></atleap:cancel>
</atleap:form>
